# include <bits/stdc++.h>
using namespace std;
void Hanoi(int N, int A, int B, int C) { 
    if(N == 1) { 
        printf("%d -> %d", A, C);
    } else { 
        Hanoi(N - 1, A, C, B);
        printf("%d -> %d", A, C);
        Hanoi(N - 1, B, A, C);
    }
}
